package app.blog.service;

import jodd.util.StringUtil;
import app.blog.entity.Article;
import app.blog.entity.Tag;

public class Tags {
	public static String the_tag(Article post) {
		StringBuilder output = new StringBuilder(20);
		for (Tag tag : post.tags()) {
			output.append(tag.name);
			output.append(", ");
		}
		if (output.length() > 0) {
			return StringUtil.cutSuffix(output.toString(), ", ");
		}
		return "";
	}
}